package com.tangguangdi.base.common.db;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 代码类型
 */
@Getter
@AllArgsConstructor
public enum CodeType {
    /**
     * ENTITY
     */
    ENTITY("Entity", "entity.ftl", "{src}/{serverOutputDir}/{packagePath}/{moduleName}/entity/{entity}.java"),
    /**
     * XML
     */
    XML("Xml", "xml.ftl", "{src}/{serverOutputDir}/{packagePath}/{moduleName}/mapper/xml/{entity}Mapper.xml"),
    /**
     * MAPPER
     */
    MAPPER("Mapper", "mapper.ftl", "{src}/{serverOutputDir}/{packagePath}/{moduleName}/mapper/{entity}Mapper.java"),
    /**
     * SERVICE
     */
    SERVICE("Service", "service.ftl", "{src}/{serverOutputDir}/{packagePath}/{moduleName}/service/I{entity}Service.java"),
    /**
     * IMPL
     */
    IMPL("Impl", "impl.ftl", "{src}/{serverOutputDir}/{packagePath}/{moduleName}/service/impl/{entity}ServiceImpl.java"),
    /**
     * CONTROLLER
     */
    CONTROLLER("Controller", "controller.ftl", "{src}/{serverOutputDir}/{packagePath}/{moduleName}/controller/{entity}Controller.java"),
    /**
     * API
     */
    API("Api", "api.ftl", "{src}/{viewOutputDir}/api/{moduleName}/{name}.js"),
    /**
     * PAGE
     */
    PAGE("Page", "page.ftl", "{src}/{viewOutputDir}/views/{moduleName}/{entity}.vue");

    /**
     * 文件名称
     */
    private String name;
    /**
     * 文件模版
     */
    private String template;
    /**
     * 存储路径
     */
    private String path;
}
